home *** CD-ROM | disk | FTP | other *** search
/ Gekkan Dennou Club 147 / Gekkan Dennou Club - 2000.8 Vol. 147 (Japan).7z / Gekkan Dennou Club - 2000.8 Vol. 147 (Japan) (Track 1).bin / tools / ws / wsb.c < prev    next >
C/C++ Source or Header  |  2000-05-05  |  29KB  |  607 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int nametb(unsigned char data1,unsigned char data2);
  4. void main(int argc, char *argv[]){
  5.         FILE *fp1,*fp2;
  6.         int i,j,m=0,datai,datai1,datai2,trashi;
  7.         
  8.         char name[17];
  9.         unsigned char datac,datac1,datac2;
  10.         int d,ten,max;
  11.         char datas[5],trashs[10];
  12.         char sa,sb;
  13.         int x;
  14.         
  15.         printf("wsb.x ver. 0.01      1999,2000 Takeo Koba\n\n");
  16.         
  17.         if((fp1=fopen(argv[1],"rt"))==NULL){
  18.                 printf("\n wsb.x [TEAM DATA TEXT] <[WS USER DATA FILE]>\n");
  19.                 exit(1);
  20.         }
  21.         
  22.         if((fp2=fopen(argv[2],"wb"))==NULL){
  23.                 if((fp2=fopen("WS_TEAM0.USR","wb"))==NULL){
  24.                         printf("\n savefile open error! \n");
  25.                         exit(1);
  26.                 }
  27.         }
  28.  
  29.         for(j=0;j<12;j++){
  30.                 /* チーム名のゴミ */
  31.                 fscanf(fp1,"%s",trashs);
  32.                 printf("%s\n",trashs);
  33.  
  34.                 /* 野手 */
  35.                 for(m=0;m<0x0d;m++){
  36.                         /* 打順 */
  37.                         fscanf(fp1,"%s",trashs);
  38.                         fprintf(fp2,"%c",m);
  39.  
  40.                         /* 名前 */
  41.                         fscanf(fp1,"%s",name);
  42.                         ten = 0;max = 6;
  43.                         for(i = 0;i < max;i++){
  44.                                 if(ten==1){            /* [濁点] */
  45.                                         d=0xb2;
  46.                                         ten=0;
  47.                                         i--;max--;
  48.                                 }
  49.                                 else if(ten==2){       /* [半濁点] */
  50.                                         d=0xb3;
  51.                                         ten=0;
  52.                                         i--;max--;
  53.                                 }
  54.                                 else{
  55.                                         if(name[i*2]==0){
  56.                                                 name[i*2+1] = 0;
  57.                                                 name[i*2+2] = 0;
  58.                                         }
  59.                                         datac1=name[i*2];
  60.                                         datac2=name[i*2+1];
  61.                                         d = nametb(datac1,datac2);
  62.                                         if(d/0x100){
  63.                                                 if((d/0x100) == 1) ten = 1;
  64.                                                 else  ten = 2;
  65.                                         }
  66.                                 }
  67.                                 fprintf(fp2,"%c",(char)(d%0x100));
  68.                         }
  69.  
  70.                         /* 背番号 */
  71.                         fscanf(fp1,"%s",datas);
  72.                         datai = atoi(datas);
  73.                         fprintf(fp2,"%c",(char)datai);
  74.  
  75.                         /* 打席 */
  76.                         datac=fgetc(fp1);
  77.                         fscanf(fp1,"%s ",datas);
  78.                         if(datas[0] == 'R') datac = 0;
  79.                         else if(datas[0] == 'L') datac = 1;
  80.                         else datac = 0;
  81.                         fprintf(fp2,"%c",datac);
  82.                         
  83.                         /* フォーム・肌・バット */
  84.                         datai = 0;
  85.                         fscanf(fp1,"%s ",datas);
  86.                         datai = datai + (datas[0]<<4);
  87.                         fscanf(fp1,"%s ",datas);
  88.                         datai = datai + (datas[0]<<2);
  89.                         fscanf(fp1,"%s ",datas);
  90.                         if((datas[0]%0x10)==0x05) datai++; /* 黒 */
  91.                         /*木 96d8  黒 8d95*/
  92.                         fprintf(fp2,"%c",(char)datai);
  93.  
  94.                         /* 守備位置 */
  95.                         fscanf(fp1,"%s ",datas);
  96.                         switch(datas[0]){
  97.                                 case 'P':datai = 1;break;
  98.                                 case 'C':if(datas[1]=='F') datai = 8;
  99.                                          else datai = 2;
  100.                                          break;
  101.                                 case '1':datai = 3;break;
  102.                                 case '2':datai = 4;break;
  103.                                 case '3':datai = 5;break;
  104.                                 case 'S':datai = 6;break;
  105.                                 case 'L':datai = 7;break;
  106.                                 case 'R':datai = 9;break;
  107.                                 case 'I':datai = 3;break;
  108.                                 case 'O':datai = 7;break;
  109.                                 default:datai = 0;break;
  110.                         }
  111.                         fprintf(fp2,"%c",(char)datai);
  112.  
  113.                         /* 打率 */
  114.                         fscanf(fp1,"%s ",datas);
  115.                         datai = ((datas[1]-'0') - 1)*100 + ((datas[2]-'0') - 5)*10 + (datas[3]-'0');
  116.                         fprintf(fp2,"%c",(char)datai);
  117.                         
  118.                         /* 本塁打 */
  119.                         fscanf(fp1,"%s",datas);
  120.                         datai = atoi(datas);
  121.                         fprintf(fp2,"%c",(char)datai);
  122.  
  123.                         /* 空白を埋める */
  124.                         datai = 0;
  125.                         fprintf(fp2,"%c",(char)datai);
  126.  
  127.                         /* BGM */
  128.                         fscanf(fp1,"%s",datas);
  129.                         if(datas[1]=='N') datai = 0xFF;
  130.                         else datai=0;
  131.                         fprintf(fp2,"%c",(char)datai);
  132.  
  133.                         /* BGM No. */
  134.                         fscanf(fp1,"%s",datas);
  135.                         datai = atoi(datas);
  136.                         fprintf(fp2,"%c",(char)datai);
  137.                         
  138.                         /* 打撃 */
  139.                         fscanf(fp1,"%s",datas);
  140.                         datai = atoi(datas);
  141.                         fprintf(fp2,"%c",(char)datai);
  142.                         fscanf(fp1,"%s",datas);/* ハイフンを取る */
  143.                         fscanf(fp1,"%s",datas);
  144.                         datai = atoi(datas);
  145.                         fprintf(fp2,"%c",(char)datai);
  146.                         
  147.                         /* 走力 */
  148.                         fscanf(fp1,"%s",datas);
  149.                         datai = atoi(datas) * 2;
  150.                         fprintf(fp2,"%c",(char)datai);
  151.  
  152.                         /* 空白を埋める */
  153.                         for(i = 0;i < 13;i++){
  154.                                 datai = 0;
  155.                                 fprintf(fp2,"%c",(char)datai);
  156.                       }
  157.  
  158.                 }
  159.                 /* 投手 */
  160.                 for(m = 0x0d;m < 0x12;m++){
  161.                 
  162.                         /* 順 */
  163.                         fscanf(fp1,"%s",trashs);
  164.                         fprintf(fp2,"%c",m);
  165.  
  166.                         /* 名前 */
  167.                         fscanf(fp1,"%s",name);
  168.                         ten = 0;max = 6;
  169.                         for(i = 0;i < max;i++){
  170.                                 if(ten==1){            /* [濁点] */
  171.                                         d=0xb2;
  172.                                         ten=0;
  173.                                         i--;max--;
  174.                                 }
  175.                                 else if(ten==2){       /* [半濁点] */
  176.                                         d=0xb3;
  177.                                         ten=0;
  178.                                         i--;max--;
  179.                                 }
  180.                                 else{
  181.                                         if(name[i*2]==0){
  182.                                                 name[i*2+1] = 0;
  183.                                                 name[i*2+2] = 0;
  184.                                         }
  185.                                         datac1=name[i*2];
  186.                                         datac2=name[i*2+1];
  187.                                         d = nametb(datac1,datac2);
  188.                                         if(d/0x100){
  189.                                                 if((d/0x100) == 1) ten = 1;
  190.                                                 else  ten = 2;
  191.                                         }
  192.                                 }
  193.                                 fprintf(fp2,"%c",(char)(d%0x100));
  194.                         }
  195.  
  196.                         /* 背番号 */
  197.                         fscanf(fp1,"%s",datas);
  198.                         datai = atoi(datas);
  199.                         fprintf(fp2,"%c",(char)datai);
  200.  
  201.                         /* 投球フォーム */
  202.                         datac=fgetc(fp1);
  203.                         fscanf(fp1,"%s ",datas);
  204.                         if(datas[0] == 'R') datac = 0;
  205.                         else if(datas[0] == 'L') datac = 1;
  206.                         else datac = 0;
  207.                         if(datas[1] == 'U') datac = datac + 4;
  208.                         fprintf(fp2,"%c",datac);
  209.                         
  210.                         /* フォーム・肌・バット */
  211.                         datai = 0;
  212.                         fscanf(fp1,"%s ",datas);
  213.                         datai = datai + (datas[0]<<4);
  214.                         fscanf(fp1,"%s ",datas);
  215.                         datai = datai + (datas[0]<<2);
  216.                         fscanf(fp1,"%s ",datas);
  217.                         if((datas[0]%0x10)==0x05) datai++; /* 黒 */
  218.                         /*木 96d8  黒 8d95*/
  219.                         fprintf(fp2,"%c",(char)datai);
  220.  
  221.                         /* 守備位置 */
  222.                         fscanf(fp1,"%s ",datas);
  223.                         switch(datas[0]){
  224.                                 case 'P':datai = 1;break;
  225.                                 case 'C':if(datas[1]=='F') datai = 8;
  226.                                          else datai = 2;
  227.                                          break;
  228.                                 case '1':datai = 3;break;
  229.                                 case '2':datai = 4;break;
  230.                                 case '3':datai = 5;break;
  231.                                 case 'S':datai = 6;break;
  232.                                 case 'L':datai = 7;break;
  233.                                 case 'R':datai = 9;break;
  234.                                 case 'I':datai = 3;break;
  235.                                 case 'O':datai = 7;break;
  236.                                 default:datai = 0;break;
  237.                         }
  238.                         fprintf(fp2,"%c",(char)datai);
  239.  
  240.                         /* 防御率 */
  241.                         fscanf(fp1,"%s ",datas);
  242.                         datai = ((datas[0]-'0')*100) + ((datas[2]-'0')*10) + (datas[3]-'0');
  243.                         datai = datai / 2;
  244.                         fprintf(fp2,"%c",(char)datai);
  245.                         
  246.                         /* 本塁打 */
  247.                         fscanf(fp1,"%s",datas);
  248.                         datai = atoi(datas);
  249.                         fprintf(fp2,"%c",(char)datai);
  250.  
  251.                         /* 空白を埋める */
  252.                         datai = 0;
  253.                         fprintf(fp2,"%c",(char)datai);
  254.  
  255.                         /* BGM */
  256.                         fscanf(fp1,"%s",datas);
  257.                         if(datas[1]=='N') datai = 0xFF;
  258.                         else datai=0;
  259.                         fprintf(fp2,"%c",(char)datai);
  260.  
  261.                         /* BGM No. */
  262.                         fscanf(fp1,"%s",datas);
  263.                         datai = atoi(datas);
  264.                         fprintf(fp2,"%c",(char)datai);
  265.                         
  266.                         /* 球速 */
  267.                         fscanf(fp1,"%s",datas);
  268.                         datai = atoi(datas);
  269.                         fprintf(fp2,"%c",(char)datai);
  270.                         fscanf(fp1,"%s",datas);/* スラッシュを取る */
  271.                         fscanf(fp1,"%s",datas);
  272.                         datai = atoi(datas);
  273.                         fprintf(fp2,"%c",(char)datai);
  274.                         fscanf(fp1,"%s",datas);/* スラッシュを取る */
  275.                         fscanf(fp1,"%s",datas);
  276.                         datai = atoi(datas);
  277.                         fprintf(fp2,"%c",(char)datai);
  278.                         
  279.                         /* 変化球 */
  280.                         fscanf(fp1,"%s",datas);
  281.                         datai = atoi(datas);
  282.                         fprintf(fp2,"%c",(char)datai);
  283.                         fscanf(fp1,"%s",datas);/* ハイフンを取る */
  284.                         fscanf(fp1,"%s",datas);
  285.                         datai = atoi(datas);
  286.                         fprintf(fp2,"%c",(char)datai);
  287.                         fscanf(fp1,"%s",datas);/* ハイフンを取る */
  288.                         fscanf(fp1,"%s",datas);
  289.                         datai = atoi(datas);
  290.                         fprintf(fp2,"%c",(char)datai);
  291.                 
  292.                         /* スタミナ */
  293.                         fscanf(fp1,"%s",datas);
  294.                         datai = atoi(datas);
  295.                         fprintf(fp2,"%c",(char)datai);
  296.  
  297.                         /* 空白を埋める */
  298.                         for(i = 0;i < 9;i++){
  299.                                 datai = 0;
  300.                                 fprintf(fp2,"%c",(char)datai);
  301.                         }
  302.                 }
  303.  
  304.                 /* 監督 */
  305.                 /* 余分なテキスト */
  306.                 fscanf(fp1,"%s",datas);
  307.                 
  308.                 /* 名前 */
  309.                 fscanf(fp1,"%s",name);
  310.                 ten = 0;max = 5;
  311.                 for(i = 0;i < max;i++){
  312.                         if(ten==1){            /* [濁点] */
  313.                                 d=0xb2;
  314.                                 ten=0;
  315.                                 i--;max--;
  316.                         }
  317.                         else if(ten==2){       /* [半濁点] */
  318.                                 d=0xb3;
  319.                                 ten=0;
  320.                                 i--;max--;
  321.                         }
  322.                         else{
  323.                                 if(name[i*2]==0){
  324.                                         name[i*2+1] = 0;
  325.                                         name[i*2+2] = 0;
  326.                                 }
  327.                                 datac1=name[i*2];
  328.                                 datac2=name[i*2+1];
  329.                                 d = nametb(datac1,datac2);
  330.                                 if(d/0x100){
  331.                                         if((d/0x100) == 1) ten = 1;
  332.                                         else  ten = 2;
  333.                                 }
  334.                         }
  335.                         fprintf(fp2,"%c",(char)(d%0x100));
  336.                 }
  337.  
  338.                 /* 体型 */
  339.                 datai = 0x20;
  340.                 fprintf(fp2,"%c",(char)datai);
  341.                 fscanf(fp1,"%s",datas);
  342.                 datac1=datas[0];datac2=datas[1];
  343.                 ten = 0;
  344.                 d = nametb(datac1,datac2);
  345.                 if(d==0xa3) datai = 0xFF;
  346.                 else datai = 0;
  347.                 fprintf(fp2,"%c",(char)datai);
  348.                 
  349.                 /* 空白を埋める */
  350.                 for(i = 0;i < 25;i++){
  351.                         datai = 0;
  352.                         fprintf(fp2,"%c",(char)datai);
  353.                 }
  354.         }
  355.  
  356.         fclose(fp1);
  357.         fclose(fp2);
  358.  
  359. }
  360. int nametb(unsigned char data1,unsigned char data2){
  361.         int d;unsigned int data;
  362.         data = ((((int)data1)%0x100) * 0x100) + (((int)data2) % 0x100);
  363.         switch(data%0x10000){
  364.                 case 0x8283:d=0x18;break;        /* [コピーライトのC] */
  365.                 
  366.                 case 0x90e6:d=0x19;break;        /* 先 */
  367.                 
  368.                 case 0x8140:d=0x20;break;        /* [空白] */
  369.                 case 0x8149:d=0x21;break;        /* ! */
  370.                 case 0x8168:d=0x22;break;        /* ” */
  371.                 case 0x8194:d=0x23;break;        /* # */
  372.                 case 0x8190:d=0x24;break;        /* $ */
  373.                 case 0x8193:d=0x25;break;        /* % */
  374.                 case 0x8195:d=0x26;break;        /* & */
  375.                 case 0x8166:d=0x27;break;        /* ’ */
  376.                 case 0x8196:d=0x2a;break;        /* * */
  377.                 case 0x817b:d=0x2b;break;        /* + */
  378.                 case 0x8165:d=0x2c;break;        /* , */
  379.                 case 0x817c:d=0x2d;break;        /* - */
  380.                 case 0x8145:d=0x2e;break;        /* ・ */
  381.                 case 0x815e:d=0x2f;break;        /* / */
  382.  
  383.                 case 0x814f:d=0x30;break;        /* 0 */
  384.                 case 0x8150:d=0x31;break;        /* 1 */
  385.                 case 0x8151:d=0x32;break;        /* 2 */
  386.                 case 0x8152:d=0x33;break;        /* 3 */
  387.                 case 0x8153:d=0x34;break;        /* 4 */
  388.                 case 0x8154:d=0x35;break;        /* 5 */
  389.                 case 0x8155:d=0x36;break;        /* 6 */
  390.                 case 0x8156:d=0x37;break;        /* 7 */
  391.                 case 0x8157:d=0x38;break;        /* 8 */
  392.                 case 0x8158:d=0x39;break;        /* 9 */
  393.                 
  394.                 case 0x8146:d=0x3a;break;        /* : */
  395.                 case 0x8147:d=0x3b;break;        /* ; */
  396.                 case 0x8183:d=0x3c;break;        /* < */
  397.                 case 0x8181:d=0x3d;break;        /* = */
  398.                 case 0x8184:d=0x3e;break;        /* > */
  399.                 case 0x8148:d=0x3f;break;        /* ? */
  400.                 case 0x8197:d=0x40;break;        /* @ */
  401.                 
  402.                 case 0x8260:d=0x41;break;        /* A */
  403.                 case 0x8261:d=0x42;break;        /* B */
  404.                 case 0x8262:d=0x43;break;        /* C */
  405.                 case 0x8263:d=0x44;break;        /* D */
  406.                 case 0x8264:d=0x45;break;        /* E */
  407.                 case 0x8265:d=0x46;break;        /* F */
  408.                 case 0x8266:d=0x47;break;        /* G */
  409.                 case 0x8267:d=0x48;break;        /* H */
  410.                 case 0x8268:d=0x49;break;        /* I */
  411.                 case 0x8269:d=0x4a;break;        /* J */
  412.                 case 0x826a:d=0x4b;break;        /* K */
  413.                 case 0x826b:d=0x4c;break;        /* L */
  414.                 case 0x826c:d=0x4d;break;        /* M */
  415.                 case 0x826d:d=0x4e;break;        /* N */
  416.                 case 0x826e:d=0x4f;break;        /* O */
  417.                 case 0x826f:d=0x50;break;        /* P */
  418.                 case 0x8270:d=0x51;break;        /* Q */
  419.                 case 0x8271:d=0x52;break;        /* R */
  420.                 case 0x8272:d=0x53;break;        /* S */
  421.                 case 0x8273:d=0x54;break;        /* T */
  422.                 case 0x8274:d=0x55;break;        /* U */
  423.                 case 0x8275:d=0x56;break;        /* V */
  424.                 case 0x8276:d=0x57;break;        /* W */
  425.                 case 0x8277:d=0x58;break;        /* X */
  426.                 case 0x8278:d=0x59;break;        /* Y */
  427.                 case 0x8279:d=0x5a;break;        /* Z */
  428.                 
  429.                 case 0x82a0:d=0x80;break;        /* あ */
  430.                 case 0x82a2:d=0x81;break;        /* い */
  431.                 case 0x82a4:d=0x82;break;        /* う */
  432.                 case 0x82a6:d=0x83;break;        /* え */
  433.                 case 0x82a8:d=0x84;break;        /* お */
  434.                 case 0x82a9:d=0x85;break;        /* か */
  435.                 case 0x82aa:d=0x185;break;       /* が */
  436.                 case 0x82ab:d=0x86;break;        /* き */
  437.                 case 0x82ac:d=0x186;break;       /* ぎ */
  438.                 case 0x82ad:d=0x87;break;        /* く */
  439.                 case 0x82ae:d=0x187;break;       /* ぐ */
  440.                 case 0x82af:d=0x88;break;        /* け */
  441.                 case 0x82b0:d=0x188;break;       /* げ */
  442.                 case 0x82b1:d=0x89;break;        /* こ */
  443.                 case 0x82b2:d=0x189;break;       /* ご */
  444.                 case 0x82b3:d=0x8a;break;        /* さ */
  445.                 case 0x82b4:d=0x18a;break;       /* ざ */
  446.                 case 0x82b5:d=0x8b;break;        /* し */
  447.                 case 0x82b6:d=0x18b;break;       /* じ */
  448.                 case 0x82b7:d=0x8c;break;        /* す */
  449.                 case 0x82b8:d=0x18c;break;       /* ず */
  450.                 case 0x82b9:d=0x8d;break;        /* せ */
  451.                 case 0x82ba:d=0x18d;break;       /* ぜ */
  452.                 case 0x82bb:d=0x8e;break;        /* そ */
  453.                 case 0x82bc:d=0x18e;break;       /* ぞ */
  454.                 case 0x82bd:d=0x8f;break;        /* た */
  455.                 case 0x82be:d=0x18f;break;       /* だ */
  456.                 case 0x82bf:d=0x90;break;        /* ち */
  457.                 case 0x82c0:d=0x190;break;       /* ぢ */
  458.                 case 0x82c2:d=0x91;break;        /* つ */
  459.                 case 0x82c3:d=0x191;break;       /* づ */
  460.                 case 0x82c4:d=0x92;break;        /* て */
  461.                 case 0x82c5:d=0x192;break;       /* で */
  462.                 case 0x82c6:d=0x93;break;        /* と */
  463.                 case 0x82c7:d=0x193;break;       /* ど */
  464.                 case 0x82c8:d=0x94;break;        /* な */
  465.                 case 0x82c9:d=0x95;break;        /* に */
  466.                 case 0x82ca:d=0x96;break;        /* ぬ */
  467.                 case 0x82cb:d=0x97;break;        /* ね */
  468.                 case 0x82cc:d=0x98;break;        /* の */
  469.                 case 0x82cd:d=0x99;break;        /* は */
  470.                 case 0x82ce:d=0x199;break;       /* ば */
  471.                 case 0x82cf:d=0x299;break;       /* ぱ */
  472.                 case 0x82d0:d=0x9a;break;        /* ひ */
  473.                 case 0x82d1:d=0x19a;break;       /* び */
  474.                 case 0x82d2:d=0x29a;break;       /* ぴ */
  475.                 case 0x82d3:d=0x9b;break;        /* ふ */
  476.                 case 0x82d4:d=0x19b;break;       /* ぶ */
  477.                 case 0x82d5:d=0x29b;break;       /* ぷ */
  478.                 case 0x82d6:d=0x9c;break;        /* へ */
  479.                 case 0x82d7:d=0x19c;break;       /* べ */
  480.                 case 0x82d8:d=0x29c;break;       /* ぺ */
  481.                 case 0x82d9:d=0x9d;break;        /* ほ */
  482.                 case 0x82da:d=0x19d;break;       /* ぼ */
  483.                 case 0x82db:d=0x29d;break;       /* ぽ */
  484.                 case 0x82dc:d=0x9e;break;        /* ま */
  485.                 case 0x82dd:d=0x9f;break;        /* み */
  486.                 case 0x82de:d=0xa0;break;        /* む */
  487.                 case 0x82df:d=0xa1;break;        /* め */
  488.                 case 0x82e0:d=0xa2;break;        /* も */
  489.                 case 0x82e2:d=0xa3;break;        /* や */
  490.                 case 0x82e4:d=0xa4;break;        /* ゆ */
  491.                 case 0x82e6:d=0xa5;break;        /* よ */
  492.                 case 0x82e7:d=0xa6;break;        /* ら */
  493.                 case 0x82e8:d=0xa7;break;        /* り */
  494.                 case 0x82e9:d=0xa8;break;        /* る */
  495.                 case 0x82ea:d=0xa9;break;        /* れ */
  496.                 case 0x82eb:d=0xaa;break;        /* ろ */
  497.                 case 0x82ed:d=0xab;break;        /* わ */
  498.                 case 0x82f0:d=0xac;break;        /* を */
  499.                 case 0x82f1:d=0xad;break;        /* ん */
  500.                 case 0x82c1:d=0xae;break;        /* っ */
  501.                 case 0x82e1:d=0xaf;break;        /* ゃ */
  502.                 case 0x82e3:d=0xb0;break;        /* ゅ */
  503.                 case 0x82e5:d=0xb1;break;        /* ょ */
  504.                 
  505.                 case 0x814a:d=0xb2;break;        /* ゛[濁点] */
  506.                 case 0x814b:d=0xb3;break;        /* ゜[半濁点] */
  507.                 
  508.                 case 0x8341:d=0xb4;break;        /* ア */
  509.                 case 0x8343:d=0xb5;break;        /* イ */
  510.                 case 0x8345:d=0xb6;break;        /* ウ */
  511.                 case 0x8347:d=0xb7;break;        /* エ */
  512.                 case 0x8349:d=0xb8;break;        /* オ */
  513.                 case 0x834a:d=0xb9;break;        /* カ */
  514.                 case 0x834b:d=0x1b9;break;       /* ガ */
  515.                 case 0x834c:d=0xba;break;        /* キ */
  516.                 case 0x834d:d=0x1ba;break;       /* ギ */
  517.                 case 0x834e:d=0xbb;break;        /* ク */
  518.                 case 0x834f:d=0x1bb;break;       /* グ */
  519.                 case 0x8350:d=0xbc;break;        /* ケ */
  520.                 case 0x8351:d=0x1bc;break;       /* ゲ */
  521.                 case 0x8352:d=0xbd;break;        /* コ */
  522.                 case 0x8353:d=0x1bd;break;       /* ゴ */
  523.                 case 0x8354:d=0xbe;break;        /* サ */
  524.                 case 0x8355:d=0x1be;break;       /* ザ */
  525.                 case 0x8356:d=0xbf;break;        /* シ */
  526.                 case 0x8357:d=0x1bf;break;       /* ジ */
  527.                 case 0x8358:d=0xc0;break;        /* ス */
  528.                 case 0x8359:d=0x1c0;break;       /* ズ */
  529.                 case 0x835a:d=0xc1;break;        /* セ */
  530.                 case 0x835b:d=0x1c1;break;       /* ゼ */
  531.                 case 0x835c:d=0xc2;break;        /* ソ */
  532.                 case 0x835d:d=0x1c2;break;       /* ゾ */
  533.                 case 0x835e:d=0xc3;break;        /* タ */
  534.                 case 0x835f:d=0x1c3;break;       /* ダ */
  535.                 case 0x8360:d=0xc4;break;        /* チ */
  536.                 case 0x8361:d=0x1c4;break;       /* ヂ */
  537.                 case 0x8363:d=0xc5;break;        /* ツ */
  538.                 case 0x8364:d=0x1c5;break;       /* ヅ */
  539.                 case 0x8365:d=0xc6;break;        /* テ */
  540.                 case 0x8366:d=0x1c6;break;       /* デ */
  541.                 case 0x8367:d=0xc7;break;        /* ト */
  542.                 case 0x8368:d=0x1c7;break;       /* ド */
  543.                 case 0x8369:d=0xc8;break;        /* ナ */
  544.                 case 0x836a:d=0xc9;break;        /* ニ */
  545.                 case 0x836b:d=0xca;break;        /* ヌ */
  546.                 case 0x836c:d=0xcb;break;        /* ネ */
  547.                 case 0x836d:d=0xcc;break;        /* ノ */
  548.                 case 0x836e:d=0xcd;break;        /* ハ */
  549.                 case 0x836f:d=0x1cd;break;       /* バ */
  550.                 case 0x8370:d=0x2cd;break;       /* パ */
  551.                 case 0x8371:d=0xce;break;        /* ヒ */
  552.                 case 0x8372:d=0x1ce;break;       /* ビ */
  553.                 case 0x8373:d=0x2ce;break;       /* ピ */
  554.                 case 0x8374:d=0xcf;break;        /* フ */
  555.                 case 0x8375:d=0x1cf;break;       /* ブ */
  556.                 case 0x8376:d=0x2cf;break;       /* プ */
  557.                 case 0x8377:d=0xd0;break;        /* ヘ */
  558.                 case 0x8378:d=0x1d0;break;       /* ベ */
  559.                 case 0x8379:d=0x2d0;break;       /* ペ */
  560.                 case 0x837a:d=0xd1;break;        /* ホ */
  561.                 case 0x837b:d=0x1d1;break;       /* ボ */
  562.                 case 0x837c:d=0x2d1;break;       /* ポ */
  563.                 case 0x837d:d=0xd2;break;        /* マ */
  564.                 case 0x837e:d=0xd3;break;        /* ミ */
  565.                 case 0x8380:d=0xd4;break;        /* ム */
  566.                 case 0x8381:d=0xd5;break;        /* メ */
  567.                 case 0x8382:d=0xd6;break;        /* モ */
  568.                 case 0x8384:d=0xd7;break;        /* ヤ */
  569.                 case 0x8386:d=0xd8;break;        /* ユ */
  570.                 case 0x8388:d=0xd9;break;        /* ヨ */
  571.                 case 0x8389:d=0xda;break;        /* ラ */
  572.                 case 0x838a:d=0xdb;break;        /* リ */
  573.                 case 0x838b:d=0xdc;break;        /* ル */
  574.                 case 0x838c:d=0xdd;break;        /* レ */
  575.                 case 0x838d:d=0xde;break;        /* ロ */
  576.                 case 0x838f:d=0xdf;break;        /* ワ */
  577.                 case 0x8392:d=0xe0;break;        /* ヲ */
  578.                 case 0x8393:d=0xe1;break;        /* ン */
  579.                 case 0x8394:d=0x1b6;break;       /* ヴ */
  580.                 case 0x8362:d=0xe2;break;        /* ッ */
  581.                 case 0x8383:d=0xe3;break;        /* ャ */
  582.                 case 0x8385:d=0xe4;break;        /* ュ */
  583.                 case 0x8387:d=0xe5;break;        /* ョ */
  584.                 case 0x8340:d=0xe6;break;        /* ァ */
  585.                 case 0x8342:d=0xe7;break;        /* ィ */
  586.                 case 0x8344:d=0xe8;break;        /* ゥ */
  587.                 case 0x8346:d=0xe9;break;        /* ェ */
  588.                 case 0x8348:d=0xea;break;        /* ォ */
  589.                 
  590.                 case 0x815b:d=0xeb;break;        /* ー */
  591.                 
  592.                 case 0x89f1:d=0xec;break;        /* 回 */
  593.                 case 0x967b:d=0xed;break;        /* 本 */
  594.                 case 0x9668:d=0xee;break;        /* 防 */
  595.                 
  596.                 case 0x8945:d=0xef;break;        /* 右 */
  597.                 case 0x8db6:d=0xfc;break;        /* 左 */
  598.                 
  599.                 case 0x8141:d=0xfd;break;        /* ゛[左下表示] */
  600.                 case 0x8142:d=0xfe;break;        /* ゜[左下表示] */
  601.                 case 0x81a1:d=0xff;break;        /* ■[四角形] */
  602.                 
  603.                 default:d=0x20;break;            /* [空白] */
  604.         }
  605.         return d;
  606. }
  607.